﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;
using Lucene.Net.Store;
using Lucene.Net.Documents;
using BingZi.HY.Core.SearchEngine.Configuration;


namespace BingZi.HY.Core.Entities.Center
{
	/// <summary>
	/// 商业信息
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("商业信息")]
	[BindTable("app_BusinessInfo", Description = "商业信息", ConnName = "Center", DbType = DatabaseType.SqlServer)]
	public partial class app_BusinessInfo
	{
		#region 属性
		private Int32 _b_Id;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "b_Id", "编号", "", "int", 10, 0, false)]
        [SearchAttribute(Field_Store.YES, Field_Index.TOKENIZED, Field_TermVector.NO)]
		public Int32 b_Id
		{
			get { return _b_Id; }
			set { if (OnPropertyChange("b_Id", value)) _b_Id = value; }
		}

		private String _b_Title;
		/// <summary>
		/// 信息标题
		/// </summary>
		[Description("信息标题")]
		[DataObjectField(false, false, false, 100)]
		[BindColumn(2, "b_Title", "信息标题", "", "nvarchar(100)", 0, 0, true)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public String b_Title
		{
			get { return _b_Title; }
			set { if (OnPropertyChange("b_Title", value)) _b_Title = value; }
		}

		private Int32 _b_InfoType;
		/// <summary>
		/// 信息类型
		/// </summary>
		[Description("信息类型")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(3, "b_InfoType", "信息类型", "0", "tinyint", 3, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public Int32 b_InfoType
		{
			get { return _b_InfoType; }
			set { if (OnPropertyChange("b_InfoType", value)) _b_InfoType = value; }
		}

		private String _b_Tags;
		/// <summary>
		/// 标签
		/// </summary>
		[Description("标签")]
		[DataObjectField(false, false, true, 100)]
		[BindColumn(4, "b_Tags", "标签", "", "nvarchar(100)", 0, 0, true)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public String b_Tags
		{
			get { return _b_Tags; }
			set { if (OnPropertyChange("b_Tags", value)) _b_Tags = value; }
		}

		private Int32 _b_Category;
		/// <summary>
		/// 信息分类编号
		/// </summary>
		[Description("信息分类编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(5, "b_Category", "信息分类编号", "", "int", 10, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public Int32 b_Category
		{
			get { return _b_Category; }
			set { if (OnPropertyChange("b_Category", value)) _b_Category = value; }
		}

		private String _b_CategoryText;
		/// <summary>
		/// 信息分类名称
		/// </summary>
		[Description("信息分类名称")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(6, "b_CategoryText", "信息分类名称", "", "nvarchar(50)", 0, 0, true)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public String b_CategoryText
		{
			get { return _b_CategoryText; }
			set { if (OnPropertyChange("b_CategoryText", value)) _b_CategoryText = value; }
		}

		private Int32 _b_ShopCategory;
		/// <summary>
		/// 店铺分类
		/// </summary>
		[Description("店铺分类")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(7, "b_ShopCategory", "店铺分类", "0", "int", 10, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public Int32 b_ShopCategory
		{
			get { return _b_ShopCategory; }
			set { if (OnPropertyChange("b_ShopCategory", value)) _b_ShopCategory = value; }
		}

		private Int32 _b_UserID;
		/// <summary>
		/// 用户编号
		/// </summary>
		[Description("用户编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(8, "b_UserID", "用户编号", "", "int", 10, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public Int32 b_UserID
		{
			get { return _b_UserID; }
			set { if (OnPropertyChange("b_UserID", value)) _b_UserID = value; }
		}

		private String _b_UserName;
		/// <summary>
		/// 用户名称
		/// </summary>
		[Description("用户名称")]
		[DataObjectField(false, false, false, 20)]
		[BindColumn(9, "b_UserName", "用户名称", "", "nvarchar(20)", 0, 0, true)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public String b_UserName
		{
			get { return _b_UserName; }
			set { if (OnPropertyChange("b_UserName", value)) _b_UserName = value; }
		}

		private String _b_CompanyName;
		/// <summary>
		/// 公司名称
		/// </summary>
		[Description("公司名称")]
		[DataObjectField(false, false, false, 100)]
		[BindColumn(10, "b_CompanyName", "公司名称", "", "nvarchar(100)", 0, 0, true)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public String b_CompanyName
		{
			get { return _b_CompanyName; }
			set { if (OnPropertyChange("b_CompanyName", value)) _b_CompanyName = value; }
		}

		private String _b_AreaIds;
		/// <summary>
		/// 地区编号
		/// </summary>
		[Description("地区编号")]
		[DataObjectField(false, false, false, 20)]
		[BindColumn(11, "b_AreaIds", "地区编号", "", "varchar(20)", 0, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public String b_AreaIds
		{
			get { return _b_AreaIds; }
			set { if (OnPropertyChange("b_AreaIds", value)) _b_AreaIds = value; }
		}

		private String _b_AreaNames;
		/// <summary>
		/// 地区名称
		/// </summary>
		[Description("地区名称")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(12, "b_AreaNames", "地区名称", "", "nvarchar(50)", 0, 0, true)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public String b_AreaNames
		{
			get { return _b_AreaNames; }
			set { if (OnPropertyChange("b_AreaNames", value)) _b_AreaNames = value; }
		}

		private String _b_Attribute;
		/// <summary>
		/// 属性
		/// </summary>
		[Description("属性")]
		[DataObjectField(false, false, true, 1073741823)]
		[BindColumn(13, "b_Attribute", "属性", "", "ntext", 0, 0, true)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public String b_Attribute
		{
			get { return _b_Attribute; }
			set { if (OnPropertyChange("b_Attribute", value)) _b_Attribute = value; }
		}

		private Int32 _b_EffectTime;
		/// <summary>
		/// 有效期
		/// </summary>
		[Description("有效期")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(14, "b_EffectTime", "有效期", "7", "int", 10, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public Int32 b_EffectTime
		{
			get { return _b_EffectTime; }
			set { if (OnPropertyChange("b_EffectTime", value)) _b_EffectTime = value; }
		}

		private DateTime _b_StartTime;
		/// <summary>
		/// 发布时间
		/// </summary>
		[Description("发布时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(15, "b_StartTime", "发布时间", "getdate()", "datetime", 3, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public DateTime b_StartTime
		{
			get { return _b_StartTime; }
			set { if (OnPropertyChange("b_StartTime", value)) _b_StartTime = value; }
		}

		private DateTime _b_UpdateTime;
		/// <summary>
		/// 更新时间
		/// </summary>
		[Description("更新时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(16, "b_UpdateTime", "更新时间", "getdate()", "datetime", 3, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public DateTime b_UpdateTime
		{
			get { return _b_UpdateTime; }
			set { if (OnPropertyChange("b_UpdateTime", value)) _b_UpdateTime = value; }
		}

		private Double _b_Balance;
		/// <summary>
		/// 预算
		/// </summary>
		[Description("预算")]
		[DataObjectField(false, false, false, 53)]
		[BindColumn(17, "b_Balance", "预算", "100", "float", 53, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public Double b_Balance
		{
			get { return _b_Balance; }
			set { if (OnPropertyChange("b_Balance", value)) _b_Balance = value; }
		}

		private String _b_Content;
		/// <summary>
		/// 信息内容
		/// </summary>
		[Description("信息内容")]
		[DataObjectField(false, false, false, 1073741823)]
		[BindColumn(18, "b_Content", "信息内容", "", "ntext", 0, 0, true)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public String b_Content
		{
			get { return _b_Content; }
			set { if (OnPropertyChange("b_Content", value)) _b_Content = value; }
		}

		private String _b_InfoPhoto;
		/// <summary>
		/// 图片
		/// </summary>
		[Description("图片")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(19, "b_InfoPhoto", "图片", "", "varchar(200)", 0, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public String b_InfoPhoto
		{
			get { return _b_InfoPhoto; }
			set { if (OnPropertyChange("b_InfoPhoto", value)) _b_InfoPhoto = value; }
		}

		private String _b_Unit;
		/// <summary>
		/// 计量单位
		/// </summary>
		[Description("计量单位")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(20, "b_Unit", "计量单位", "", "nvarchar(50)", 0, 0, true)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public String b_Unit
		{
			get { return _b_Unit; }
			set { if (OnPropertyChange("b_Unit", value)) _b_Unit = value; }
		}

		private Double _b_Price;
		/// <summary>
		/// 单价
		/// </summary>
		[Description("单价")]
		[DataObjectField(false, false, true, 53)]
		[BindColumn(21, "b_Price", "单价", "", "float", 53, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public Double b_Price
		{
			get { return _b_Price; }
			set { if (OnPropertyChange("b_Price", value)) _b_Price = value; }
		}

		private String _b_MaxUnit;
		/// <summary>
		/// 库存量
		/// </summary>
		[Description("库存量")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(22, "b_MaxUnit", "库存量", "", "nvarchar(10)", 0, 0, true)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public String b_MaxUnit
		{
			get { return _b_MaxUnit; }
			set { if (OnPropertyChange("b_MaxUnit", value)) _b_MaxUnit = value; }
		}

		private String _b_MinUnit;
		/// <summary>
		/// 最小起订量
		/// </summary>
		[Description("最小起订量")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(23, "b_MinUnit", "最小起订量", "", "nvarchar(10)", 0, 0, true)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public String b_MinUnit
		{
			get { return _b_MinUnit; }
			set { if (OnPropertyChange("b_MinUnit", value)) _b_MinUnit = value; }
		}

		private Int32 _b_State;
		/// <summary>
		/// 信息状态
		/// </summary>
		[Description("信息状态")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(24, "b_State", "信息状态", "0", "tinyint", 3, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public Int32 b_State
		{
			get { return _b_State; }
			set { if (OnPropertyChange("b_State", value)) _b_State = value; }
		}

		private Int32 _b_LastUserID;
		/// <summary>
		/// 最后更新用户
		/// </summary>
        [Description("最后更新用户")]
		[DataObjectField(false, false, false, 10)]
        [BindColumn(25, "b_LastUserID", "最后更新用户", "", "int", 10, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public Int32 b_LastUserID
		{
			get { return _b_LastUserID; }
			set { if (OnPropertyChange("b_LastUserID", value)) _b_LastUserID = value; }
		}

		private DateTime _b_LastTime;
		/// <summary>
		/// 最后更新时间
		/// </summary>
        [Description("最后更新时间")]
		[DataObjectField(false, false, false, 3)]
        [BindColumn(26, "b_LastTime", "最后更新时间", "", "datetime", 3, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public DateTime b_LastTime
		{
			get { return _b_LastTime; }
			set { if (OnPropertyChange("b_LastTime", value)) _b_LastTime = value; }
		}

		private String _b_LastIP;
		/// <summary>
		/// 最后更新IP
		/// </summary>
		[Description("")]
		[DataObjectField(false, false, false, 20)]
        [BindColumn(27, "b_LastIP", "最后更新IP", "", "varchar(20)", 0, 0, false)]
        ///[SearchAttribute(Field.Store.YES, Field.Index.TOKENIZED, Field.TermVector.NO)]
		public String b_LastIP
		{
			get { return _b_LastIP; }
			set { if (OnPropertyChange("b_LastIP", value)) _b_LastIP = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "b_Id" : return _b_Id;
					case "b_Title" : return _b_Title;
					case "b_InfoType" : return _b_InfoType;
					case "b_Tags" : return _b_Tags;
					case "b_Category" : return _b_Category;
					case "b_CategoryText" : return _b_CategoryText;
					case "b_ShopCategory" : return _b_ShopCategory;
					case "b_UserID" : return _b_UserID;
					case "b_UserName" : return _b_UserName;
					case "b_CompanyName" : return _b_CompanyName;
					case "b_AreaIds" : return _b_AreaIds;
					case "b_AreaNames" : return _b_AreaNames;
					case "b_Attribute" : return _b_Attribute;
					case "b_EffectTime" : return _b_EffectTime;
					case "b_StartTime" : return _b_StartTime;
					case "b_UpdateTime" : return _b_UpdateTime;
					case "b_Balance" : return _b_Balance;
					case "b_Content" : return _b_Content;
					case "b_InfoPhoto" : return _b_InfoPhoto;
					case "b_Unit" : return _b_Unit;
					case "b_Price" : return _b_Price;
					case "b_MaxUnit" : return _b_MaxUnit;
					case "b_MinUnit" : return _b_MinUnit;
					case "b_State" : return _b_State;
					case "b_LastUserID" : return _b_LastUserID;
					case "b_LastTime" : return _b_LastTime;
					case "b_LastIP" : return _b_LastIP;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "b_Id" : _b_Id = Convert.ToInt32(value); break;
					case "b_Title" : _b_Title = Convert.ToString(value); break;
					case "b_InfoType" : _b_InfoType = Convert.ToInt32(value); break;
					case "b_Tags" : _b_Tags = Convert.ToString(value); break;
					case "b_Category" : _b_Category = Convert.ToInt32(value); break;
					case "b_CategoryText" : _b_CategoryText = Convert.ToString(value); break;
					case "b_ShopCategory" : _b_ShopCategory = Convert.ToInt32(value); break;
					case "b_UserID" : _b_UserID = Convert.ToInt32(value); break;
					case "b_UserName" : _b_UserName = Convert.ToString(value); break;
					case "b_CompanyName" : _b_CompanyName = Convert.ToString(value); break;
					case "b_AreaIds" : _b_AreaIds = Convert.ToString(value); break;
					case "b_AreaNames" : _b_AreaNames = Convert.ToString(value); break;
					case "b_Attribute" : _b_Attribute = Convert.ToString(value); break;
					case "b_EffectTime" : _b_EffectTime = Convert.ToInt32(value); break;
					case "b_StartTime" : _b_StartTime = Convert.ToDateTime(value); break;
					case "b_UpdateTime" : _b_UpdateTime = Convert.ToDateTime(value); break;
					case "b_Balance" : _b_Balance = Convert.ToDouble(value); break;
					case "b_Content" : _b_Content = Convert.ToString(value); break;
					case "b_InfoPhoto" : _b_InfoPhoto = Convert.ToString(value); break;
					case "b_Unit" : _b_Unit = Convert.ToString(value); break;
					case "b_Price" : _b_Price = Convert.ToDouble(value); break;
					case "b_MaxUnit" : _b_MaxUnit = Convert.ToString(value); break;
					case "b_MinUnit" : _b_MinUnit = Convert.ToString(value); break;
					case "b_State" : _b_State = Convert.ToInt32(value); break;
					case "b_LastUserID" : _b_LastUserID = Convert.ToInt32(value); break;
					case "b_LastTime" : _b_LastTime = Convert.ToDateTime(value); break;
					case "b_LastIP" : _b_LastIP = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得商业信息字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String b_Id = "b_Id";

			///<summary>
			/// 信息标题
			///</summary>
			public const String b_Title = "b_Title";

			///<summary>
			/// 信息类型
			///</summary>
			public const String b_InfoType = "b_InfoType";

			///<summary>
			/// 标签
			///</summary>
			public const String b_Tags = "b_Tags";

			///<summary>
			/// 信息分类编号
			///</summary>
			public const String b_Category = "b_Category";

			///<summary>
			/// 信息分类名称
			///</summary>
			public const String b_CategoryText = "b_CategoryText";

			///<summary>
			/// 店铺分类
			///</summary>
			public const String b_ShopCategory = "b_ShopCategory";

			///<summary>
			/// 用户编号
			///</summary>
			public const String b_UserID = "b_UserID";

			///<summary>
			/// 用户名称
			///</summary>
			public const String b_UserName = "b_UserName";

			///<summary>
			/// 公司名称
			///</summary>
			public const String b_CompanyName = "b_CompanyName";

			///<summary>
			/// 地区编号
			///</summary>
			public const String b_AreaIds = "b_AreaIds";

			///<summary>
			/// 地区名称
			///</summary>
			public const String b_AreaNames = "b_AreaNames";

			///<summary>
			/// 属性
			///</summary>
			public const String b_Attribute = "b_Attribute";

			///<summary>
			/// 有效期
			///</summary>
			public const String b_EffectTime = "b_EffectTime";

			///<summary>
			/// 发布时间
			///</summary>
			public const String b_StartTime = "b_StartTime";

			///<summary>
			/// 更新时间
			///</summary>
			public const String b_UpdateTime = "b_UpdateTime";

			///<summary>
			/// 预算
			///</summary>
			public const String b_Balance = "b_Balance";

			///<summary>
			/// 信息内容
			///</summary>
			public const String b_Content = "b_Content";

			///<summary>
			/// 图片
			///</summary>
			public const String b_InfoPhoto = "b_InfoPhoto";

			///<summary>
			/// 计量单位
			///</summary>
			public const String b_Unit = "b_Unit";

			///<summary>
			/// 单价
			///</summary>
			public const String b_Price = "b_Price";

			///<summary>
			/// 库存量
			///</summary>
			public const String b_MaxUnit = "b_MaxUnit";

			///<summary>
			/// 最小起订量
			///</summary>
			public const String b_MinUnit = "b_MinUnit";

			///<summary>
			/// 信息状态
			///</summary>
			public const String b_State = "b_State";

			///<summary>
			/// 最后更新用户
			///</summary>
			public const String b_LastUserID = "b_LastUserID";

			///<summary>
			/// 最后更新时间
			///</summary>
			public const String b_LastTime = "b_LastTime";

			///<summary>
			/// 最后更新IP
			///</summary>
			public const String b_LastIP = "b_LastIP";
		}
		#endregion
	}
}